function saveCanLamSang(){
	
	$.ajax({
		type: 	'POST',
		url:	"../CanLamSang/EditCanLamSangAjax?set_ajax_view",
		data: 	$('#frmCLSEdit').serialize(),
		dataType: 'json',
		beforeSend: function() {			
			$('#btnSave').hide();
			$('#module-loading').show();
		},
        complete: function() {
			$('#btnSave').show();			
			$('#module-loading').hide();
		},
		success: function(data) {									
			$('#encounterId').val(data.encounterId);		
			$('#lblEditMessage').text(_("Save successful")).css('color', 'green').show();									
		}
	});		
}

function loadKetQuaCLS() {
	$.ajax({
		type: 'POST',
		url:  '../CanLamSang/LoadKetQuaCLSAjax?set_ajax_view',
		data: 'recordId=' + $('#recordId').val(),
		beforeSend: function() {
			$('#rightContent').slideUp();
		},
		success: function(data) {
			$('#rightContent').html(data).slideDown();
		}
	})
}

function loadChiDinhCLS() {
	$.ajax({
		type: 'POST',
		url:  '../CanLamSang/LoadChiDinhCLSAjax?set_ajax_view',		
		data: 'recordId=' + $('#recordId').val(),
		beforeSend: function() {
			$('#rightContent').slideUp();
		},
		success: function(data) {
			$('#rightContent').html(data).slideDown();
		}
	})
}

function printPhieuDienCo() {
	var url = '../CanLamSang/PrintPhieuDienCo?set_print_view' + '&recordId=' + $('#recordId').val() + '&';
	url += $('#formDienCo').serialize() ;
	window.open(url, '', 'scrollbars=yes, menubar=no, height=700, width=800, resizable=yes, toolbar=no, location=no, status=no');
}

function printPhieuDienNao() {
	var url = '../CanLamSang/PrintPhieuDienNao?set_print_view' + '&recordId=' + $('#recordId').val() + '&';
	url += $('#formDienNao').serialize() ;
	window.open(url, '', 'scrollbars=yes, menubar=no, height=700, width=800, resizable=yes, toolbar=no, location=no, status=no');
}

function printPhieuSieuAm() {
	var url = '../CanLamSang/PrintPhieuSieuAm?set_print_view' + '&recordId=' + $('#recordId').val() + '&';
	url += $('#formSieuAm').serialize() ;
	window.open(url, '', 'scrollbars=yes, menubar=no, height=700, width=800, resizable=yes, toolbar=no, location=no, status=no');
}

function printPhieuXetNghiem() {
	var url = '../CanLamSang/PrintPhieuXetNghiem?set_print_view' + '&recordId=' + $('#recordId').val() + '&';
	url += $('#formXetNghiem').serialize() ;
	window.open(url, '', 'scrollbars=yes, menubar=no, height=700, width=800, resizable=yes, toolbar=no, location=no, status=no');
}

function printPhieuChuyenKhoa() {
	var url = '../CanLamSang/PrintPhieuChuyenKhoa?set_print_view' + '&recordId=' + $('#recordId').val() + '&';
	url += $('#formChuyenKhoa').serialize() ;
	window.open(url, '', 'scrollbars=yes, menubar=no, height=700, width=800, resizable=yes, toolbar=no, location=no, status=no');
}

function printPhieuChiDinh() {
	var url = '../CanLamSang/PrintPhieuChiDinh?set_print_view' + '&recordId=' + $('#recordId').val() + '&';
	url += $('#formChiDinh').serialize() ;
	window.open(url, '', 'scrollbars=yes, menubar=no, height=700, width=800, resizable=yes, toolbar=no, location=no, status=no');
}
